package com.cw.maintenance.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;

import com.cw.maintenance.AddDataDialog;

public class InsertCommitAction extends AbstractAction {
	AddDataDialog insertDia;

	public InsertCommitAction() {
		super();
	}

	public InsertCommitAction(String name) {
		super(name);
	}

	public InsertCommitAction(String name, Icon icon, AddDataDialog insertDia) {
		super(name, icon);
		this.insertDia = insertDia;
	}

	/**
	 * Invoked when an action occurs.
	 * 
	 * @param e
	 *            ActionEvent
	 * @todo Implement this java.awt.event.ActionListener method
	 */
	public void actionPerformed(ActionEvent e) {
		new Thread(new Runnable(){

			@Override
			public void run() {
				// TODO Auto-generated method stub
				insertDia.insertData();
				
			}}).start();
		// Vector rowdata = new Vector<Object>();
		// Vector rowdata = insertDia.get3dValue();
		// for (int i = 0; i < rowdata.size(); i++) {
		// rowdata.elementAt()
		// }
	}
}
